/* Bradon Benitez & Subir Pradhan.
   CS 419 Assignment 5: Circular Doubly Linked List implementation
   Dr. Liu
   Nov 04, 2011
*/
#include <iostream>
#include "BSHW5.h"
using namespace std;


int main()
{
    string inputCh;
    cout << "Circular Doubly Linked List Implementation. \n\n\n***---> STRING Implementation. <---***\n\n\n";
    SSList <string> myCList;

    cout << " Insert the String value at front of List: ";
    cin >> inputCh;
    myCList.insert_front(inputCh);

    cout << " Insert the String value at back of List: ";
    cin >> inputCh;
    myCList.insert_back(inputCh);
    cout << "Displaying the List Contents \n";
    myCList.displayAll();

    int inputVal = 0;
    cout << "\n\n***---> NOW INT Implementation. <---***\n\n\n";
    SSList<int> myList;

    cout << "Checking if the List is empty \n";
    if(myList.empty())
        cout << "The List is empty \n";
    else
        cout << "The List is not empty \n";

    cout << " Insert the value at front of List: ";
    cin >> inputVal;
    myList.insert_front(inputVal);

    cout << " Insert the value at back of List: ";
    cin >> inputVal;
    myList.insert_back(inputVal);

    cout << " Insert the value at front of List: ";
    cin >> inputVal;
    myList.insert_front(inputVal);

    cout << " Insert the value at back of List: ";
    cin >> inputVal;
    myList.insert_back(inputVal);

    cout << "Displaying the List Size: ";
    cout << myList.size() << endl;

    cout << "Displaying the List Contents \n";
    myList.displayAll();

    cout << "Checking if the List is empty \n";
    if(myList.empty())
        cout << "The List is empty \n";
    else
        cout << "The List is not empty \n";

    cout << "Displaying the front value of node of list: ";
    cout << myList.front() << endl;

    cout << "Displaying the back value of node of list: ";
    cout << myList.back() << endl;

    cout << "Deleting all vlaues from the list... \n";
    myList.delAll();

    cout << "Checking if the List is empty... \n";
    if(myList.empty())
          cout << "The List is empty \n";
    else
          cout << "The List is not empty \n";

    return 0;
}
